import requests
import hashlib
import time
def md5(str):
    return hashlib.md5(str.encode('utf-8')).hexdigest()

stt="asddswysjdS6G#sdf"
datetime=str(int(time.time()*1000))
enc = md5(datetime + stt)
headers = {
    "Accept": "application/json, text/plain, */*",
    "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,ar;q=0.7",
    "Cache-Control": "no-cache",
    "Connection": "keep-alive",
    "Pragma": "no-cache",
    "Referer": "https://scjg.mwr.gov.cn/",
    "Sec-Fetch-Dest": "empty",
    "Sec-Fetch-Mode": "cors",
    "Sec-Fetch-Site": "same-origin",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0",
    "enc": enc,
    # "sec-ch-ua": '"Not;A=Brand";v="99", "Microsoft Edge";v="139", "Chromium";v="139"',
    # "sec-ch-ua-mobile": "?0",
    # "sec-ch-ua-platform": '"Windows"',
    "time": datetime,
}
url = "https://scjg.mwr.gov.cn/api/unit/workingUnit/getQyryDetail"
params = {"riunCode": "91350182593463886Y"}
response = requests.get(url, headers=headers, params=params,proxies={"http": "http://127.0.0.1:7890", "https": "http://127.0.0.1:7890"})

print(response.text)
print(response)
